Ovation Pro Document | 2002-01-10 | 128KB | 804 lines
OvationPro
(21-Sep-00)
1 to 10
Generic
Black
White
Transparent
Green
Magenta
Yellow
Registration
RGB000000
RGBFFFFFF
Trinity.Medium.Italic
System.Fixed
Homerton.Bold
Homerton.Bold.Oblique
Homerton.Medium
Trinity.Medium
Trinity.Bold
BodyText
Sub-Heading
Hanging indent
Half space
Centre
Effect16
Homerton.Medium
Effect21
Justify
System.Fixed
{filename} P{pagenumber} {datetime}
Emailing Powerbase Support and accessing our website
The iconbar Information window has buttons called
and
Email
, in fact they
ve been there since v.7.76 but have somehow escaped mention until now. Provided that the filer has
your browser, clicking on the
button will load it (if it
s not already loaded) and insert the correct URL for our website from which you can download the latest version of
Powerbase
, its documentation, and a set of sample databases and script files. Similarly, if the filer has seen your mail program, clicking on the
Email
button will bring up a blank email with the correct email address for Powerbase Support.
Saving data about subfile usage and updating
The Information window accessed from the main menu now incorporates a
button which opens the standard Save box. The details displayed in the window can be saved as a text file. By default the file will be saved in PrintJobs under the name Stats.
Giving a database a title screen
You might like the idea of having your database start up by displaying a pretty picture and/or some fancy text as an introduction. You can do this by devising a suitable sprite and saving the sprite file inside the database directory under the name Title. Only the name of the sprite
is important; the name of the sprite itself is immaterial and, if the file contains more than one sprite, the first will be used.
When the database is opened the sprite will cover the record window and is scaled to fit. The aspect ratio of the sprite is maintained, which means there will usually be strips of grey bordering the sprite, either at the sides or at top and bottom, since it is most unlikely that the record window
s aspect ratio will match that of the sprite. If you want to display text it needs to be part of the sprite. The easiest way is to design your title screen in
then grab it as a sprite using
Paint
snapshot
facility.
As soon as you click on a keypad button, or anywhere on the title screen itself, the sprite vanishes. You can bring it back if you really want to by clicking ADJUST on the keypad
button (which is not very intuitive but such a trivial feature hardly deserves a special button or menu entry to itself!). If you later decide to dispense with the title screen you should simply delete the Title file.
Preserving your saved options when upgrading
A number of
Powerbase
dialogue boxes give you the opportunity to save your own choices to be used in place of those initially supplied. The Print options window, for example, allows you to save the chosen options, not only in the database currently in use, but in
Powerbase
itself. The latter choice makes your own options the defaults which will be used when
Powerbase
is subsequently run and will be loaded by clicking on the
Load defaults
button on the Print options window. Exactly the same scheme is adopted for Preferences, CSV options and Field Colours. You may also overwrite the supplied defaults for keystroke equivalents (from the menu over the keypad) and for the design grid. You might also want to alter the supplied Config file.
All the files relating to the above (!PrintOpts, Preference, CSVoptions, FieldCols, Fkeys, GridOpts and Config) are stored in the directory !Powerbase.Resources. Until now, copying a new version of
Powerbase
over an older one would overwrite these files, thus losing your carefully studied choices, unless you had the knowledge and forethought to make copies first and then put them back again.
In v. 8.20 this source of annoyance has been removed by omitting the seven files referred to from the Resources subdirectory and placing them instead in a new subdirectory called Initial. Whenever
Powerbase
is run, Resources is examined for each of the files. If present it is left alone but, if absent, the file is copied from Initial. There is just one problem with this system. New entries in a file (a new Config setting, for example) will not be used by the program unless the user deletes the file concerned from Resources and re-runs
Powerbase
to force copying of the new file. To ameliorate this situation appropriate initial values for any new settings are provided and the user is warned of any files which contain new settings on the first occasion the new version is run, and again the first time you quit the program.
Where there is a
Load defaults
button on a window a click with SELECT loads the file from Resources as previously, i.e. loads whatever defaults the user has set up if they have been changed at all. By holding down Shift whilst clicking with SELECT you can load the new version of the file from Initial.
Storage of external fields (including scrollable lists)
In all previous versions the top-level subdirectory containing the files associated with Text, Text block, Sprite, Picture, Draw and Scrollable list fields was given a name based on the field number. For example, the sample database
Boxes
has a Text block as field 9 and the relevant directory is called
Memo9
. The
Scroller
database contains a Text button field whose directory is also called
Memo9
and the Scrollable list (field 20) whose directory is
Scroll20
. This system of naming has been changed, field
being used instead of field numbers. Under the new system the Text block directory for
Boxes
is called
Desctext
and the two directories for
Scroller
are called
NOTEtext
and
TRAXscroll
When an older database is opened using
Powerbase 8.20
the relevant directories are renamed in accordance with this new scheme and a message is displayed informing the user of this. The only time you need concern yourself with it is if you need to use such a modified database with an earlier version of
Powerbase
. This doesn
t cause an error but all the affected fields will be blank, even though the associated files are actually there in the renamed directories. Look inside the database directory and you will find a
!ReadMe
file which lists the renamings, and an Obey file called
Revert
which can be run in order to restore the old names.
1.3.1 Using the Acorn Help Application
Most
Powerbase
users will know that the program makes extensive use of
on windows and menus. To further encourage its use a button from which
Help
can be started has been placed on the Information window accessible from the iconbar menu. A similar button allows you to do the same thing from the main menu
s Information window.
2 Browsing and Editing
An alternative to the keypad is now provided in the shape of a tool-pane attached to the left-hand edge of the record window. To keep the tool-pane to a reasonable size not all the keypad buttons have been included. No functionality has been sacrificed, however, because the actions of all the missing buttons can be produced by clicking on others with ADJUST. There is, for example, no
Previous record
button, but clicking ADJUST over the
Next record
button has the same effect. To produce a tidy layout some of the buttons have been changed in size or design. The
New record
and
Search
buttons now carry simply a plus sign and a question mark respectively.
Force update
has been shortened to
Update
and
List values
changed to
Table
When used with many databases (including several of the supplied sample databases; notably
Elements
) the tool-pane is so convenient that it has been made the default setting. However, if you don
t like it you can easily have the original keypad back with its buttons looking exactly as of old. The feature is controlled by a new setting in !Powerbase.Resources.Config which has the token
Tools
. A parameter of 1 gives the keypad, 2 gives the tool-pane.
2.3.3 Searching by filter
A button and display icon have been added to the Filter window to display the number of matches found. Clicking on the
Next record
button with the window open and a filter active causes the displayed number to increment with every match found until the end of the file is reached. Wrap-around then occurs and the number no longer increases. Clicking
Count
displays the total number of matches in the subfile straight away.
2.5.2 Copying fields
In addition to copying within
Powerbase
using the local clipboard (
Ctrl C
and
Ctrl V
) and copying to and from external applications via the global clipboard (
Ctrl Shift C
and
Ctrl Shift V
) it is now possible to copy individual fields by dragging with SELECT. If you place the pointer over a field and press SELECT a text file icon appears under the pointer. You may drag this to:
another field in the record, provided the latter is an editable field
a writable icon in any
Powerbase
dialogue box (e.g. the Query panel)
an external application which can accept text files such as
Impression
a filer window.
The text will be copied to wherever the drag ends. In (a) and (b), if the data is too long for the icon it will be truncated to fit. In case (c) the data will be inserted at the caret. (d) saves the text under the name of the field tag. You might occasionally find it useful to run two copies of
Powerbase
, each with a different database (or even each with the same database!), and drag the contents of fields from one to the other. See also
9.2, S
2.6.4 Editing scrollable lists
Dates and Times may be entered by means of
Ctrl D
and
Ctrl T
respectively, just like for other fields. Data from validation tables may be entered by double-clicking on the table (see
5.9, S
3.1.1 The window destination/3.1.3 The printer destination
Sorting a report in a window can be done in either ascending or descending order. (This applies also to the Sort-before-printing option; see
3.10, S
). Dates and date-related fields such as day-of-week, month-of-year etc. now sort chronologically.
From v.8.23
Powerbase
is able to print in colour both in a window and to a colour printer. The Print options window contains three new buttons bearing the letters
and
to select the foreground colours for the
eader and
ody fonts and for vertical and horizontal
ules. The text and border of these buttons is black by default but clicking on them with SELECT or ADJUST cycles through the 16 standard desktop colours and causes the fonts and rules to be printed in the selected colours. Some are, of course, more useful than others: light grey, cream, yellow and orange are poor but dark grey, red, blue and green are quite usable for adding enhancement to reports.
3.5.1 The construction of search formulae (scrollable lists)
In previous versions the facilities for querying Scrollable list fields was very limited; only the comparators { (
contains
) and }{ (
doesn
t contain
) were permissible, and they applied to the list in its entirety. It is now possible to use = and all the other comparators and the test is applied to each individual cell of the list. You can confine the query to one column of a list by appending the column number to the field tag following a # character. e.g. in the supplied example database
Scroller
, a formula of the type TRAX#1=<target> would examine the cells in column 1 only, whereas TRAX=<target> would examine the whole list.
Scrollable list items are always of string, not numeric, type so a numeric value test such as TRAX#3>15 wouldn
t give the right result. However, the already-existing trick of forcing numeric comparison by placing the tag in square brackets as in: [TRAX#3]>15 will work.
3.7.1 Printing records from more than one subfile
The ability to include in a report records from more than one subfile has been present for some time. This multiple subfile feature has been extended to some other operations where the Query panel is involved, namely Global changes, CSV export and Subset export. The remaining Query panel operations (Filter and Batch move/delete) still operate on the current subfile only.
3.7.2 Including record number, key and subfile number
The Match window has option switches which allow the record number, current key and subfile number to be included in a report. There used to be no choice about where these extra items appeared or in what order: the order was fixed to that stated above and the information appeared in the report at the beginning of each record. It is now possible to incorporate these items anywhere in the field order. With the Match window open, highlight fields for printing by clicking with ADJUST in the usual way and select the option switches at the required places in the field order.
The field-selection menu, accessed from a menu button on the Match window and also by
Ctrl F
(see
), shows these extra items for printing in their correct place in the field order, picking them out in dark blue. If Extra calculations have been defined (see
) these also appear on the selection menu in red. In view of the increased importance of this menu it is now also accessible via a new entry,
Display selection
, on the
Print
submenu.
3.10 The Print options window
A new icon next to the field for the
Sort on
field tag or column number allows you to specify whether the pre-display sort is to be ascending or descending. It shows a blue arrow which may be clicked to toggle it between an up and a down arrow.
New options have been introduced for the printing of scrollable lists. When printing in the default single row format items from the same row of the scrollable list were formerly separated by a single space and the end of each row marked by a semicolon followed by a space. Both these markers can now be chosen by the user by entering them into two writable icons. The supplied defaults are a comma-plus-space and a semicolon-plus-two-spaces respectively. When the alternative columnar format is chosen the end-of-row marker is irrelevant and is greyed out, but the separator used between items in the same row may still be chosen. A comma can look ugly in this format and one or more spaces could be a more suitable choice. (See also
8.3.1, S
4.2.1 Simple field creation
The choices for the layout grid can now be saved and will be used next time you run
Powerbase
. You can return to the settings initially supplied by Shift-clicking with SELECT on
Load defaults
. (see also p.2., S,
Preserving your saved options when upgrading
4.2.5 Other types of editable field
Entering an 8-character date (i.e. one with a 2-digit year) into a 10-character date field (one which displays the year in full) now handles century wrap-around as follows:
(a) Years less than 10 are assumed to be 21st century, e.g.19-10-02 will be reformatted as 19-10-2002
(b) Other years are assumed to be 20th century, e.g. 19-10-42 will be reformatted as 19-10-1942
The century changeover year can be altered by editing !Powerbase.Resources.Config. Look for the token
CentChange
and alter the associated value (currently 10) to whatever you require. The above rule is also followed when a database is reformatted so that an 8-character date becomes a 10-character one (see
10.3, S
4.2.6 Scrollable lists
Most of the material on p.30 of the manual relating to this section is now superseded. The definition of these fields has been made much easier. It is no longer necessary to enter the column width in
Data length
(in fact this icon is greyed out when you select Scrollable list as the field type), nor do you need to create a
Format
file in a separate operation in order to specify columns of differing width. An extension at the foot of he field-definition window allows you to enter the required widths for the number of columns chosen, and also the number of visible rows.
Moreover, you may change the column widths (and even the number of columns)
without
rebuilding the whole database as you would need to do if you wanted to alter the defined length for other types of field. The
Adjust format
utility from the iconbar menu allows you to make such changes with the minimum amount of bother. Just one word of warning: if you increase the number of columns in a Scrollable list by this method the data will spread out over the new columns, i.e. the cells will be used in order. If what you really want is one or more
blank
columns to the right of the existing data then you need
New database format
, not
Adjust format
4.2.8 External
A new option switch, labelled
Display
, has been added to the Field-definition window. It is active only for External fields of types Text, Sprite, Draw and Remote, i.e. those which link external objects to buttons on the record window.
When a record is displayed, any field for which this switch is selected will behave as though the button had been clicked. You could, for instance, have a Remote button linking records to a collection of JPEGs and the pictures would be displayed as you browsed through the database without any further action on your part. For this to work a suitable JPEG viewer must have been
by the filer. Most users will have
ChangeFSI
, recent versions of which can display JPEGs, but it is rather slow. Thomas Olsson's PD application
EasyView
is much faster and ideal for using with
Powerbase
in this way.
, from RISC OS 3.7 on, display JPEGs with lightning speed but is no use for the purpose described above because it doesn't respond to double-clicks on JPEGs or Filer_Open commands issued by
Powerbase
for JPEGs.
Note:
This auto-display feature can also be toggled on and off by clicking Shift-SELECT on the relevant button, irrespective of whether the new option switch is selected. If you wanted the feature to be active when the database was opened you would set the option switch, which would still leave you with the ability to turn auto-display off temporarily using Shift-SELECT. If, on the other hand, you only want to use auto-display occasionally, leave the option switch off and turn the feature on with Shift-SELECT when you require it.
Important update on Remote type
Previous versions of
Powerbase
stored the absolute pathnames of objects linked to Remote buttons. v.8.27 also allows
relative
pathnames to be used, i.e. relative to the position of the database in the disc
s directory structure. Both methods have their advantages and disadvantages and the type of pathname stored is determined by the entry PathLen in the
le. This item formerly speci
ed only the maximum path-length for Remote objects, the default being 255. The number is now suf
xed with either
(for relative) or
(for absolute), the former being the default. Individual databases can have their own
les so it is quite feasible for some databases to use one type of pathname and some the other.
Absolute pathnames are suitable when you are sure the
les associated with the database are going to stay in the same locations as when they were
rst attached to the records, but you might want to move the database itself. You can move the database to a different disc, or even a different
ling system (on the same machine), and the Remote button will still work. Moving one of the attached
les, however, will make the stored pathname invalid and cause the button to show a
instead of the appropriate
le icon.
It is envisaged that users will want to use databases with Remote
elds to catalogue data such as collections of photographs in JPEG format and might at some stage wish to move the whole collection to a zip drive or CD ROM. The use of relative pathnames makes it possible.
An example will make this clearer. Suppose we have a directory of JPEGs called
Pictures
, each of which is associated via a Remote button with a record in a database called
!MyPhotos
. The arrangement on the hard disc might be as in the diagram below.
would have stored. The pathname of the database is:
ADFS::HardDisc4.$.FredsData.Databases.!MyPhotos
rst sections of both pathnames, as far as and including
FredsData
, are identical and this enables us to locate
Horse
without using its full pathname.
Powerbase
does, of course,
know the full pathname for
!MyPhotos
when the database is open so it can
Horse
by, in effect, saying:
Go up two levels in the disc tree from the database, then use the pathname
Pictures.Animals.Horse
But how do we let
Powerbase
know it needs to go up two levels? The character
, included as an element in a pathname, is an instruction to go up one level. What needs to be stored for the example given above therefore is:
^.^.Pictures.Animals.Horse
which is the pathname relative to
!MyPhotos
. When
Powerbase
reads this all it needs to do is pre
x it with the already-known pathname for
!MyPhotos
and the JPEG
Horse
can be retrieved. If the directories
Databases
(containing
!MyPhotos
) and
Pictures
(containing the subdirectory
Animals)
were transferred to the root directory of a CD ROM the pathnames of
Horse
!MyPhotos
might
change to something like:
CDFS::PICLIB.$.
Pictures.Animals.Horse
and:
CDFS::PICLIB.$.Databases.!MyPhotos
!MyPhotos
contained the (old)
absolute
pathname for
Horse,
Powerbase
would be unable to
nd the
le, but the
relative
pathname is still valid: it
s still a matter of going up two directories (thus reaching the root) and then working down from there.
You can highlight a Remote button with ADJUST as part of a print selection in order to print the stored pathnames of the Remote objects. An individual pathname may be displayed by clicking with Shift-ADJUST.
Attention is also drawn to the fact that objects attached to
Run file
and
Directory
buttons on the record window have their pathnames determined in the same way as for Remote objects. (See below.)
4.2.11 Button fields
Run file and Directory
To avoid problems with objects linked to
Run file
and
Directory
buttons when a database is moved to a different disc,
ling system or computer, make sure that the linked
les are referenced by relative rather than absolute pathnames. (See
4.2.8 S
, above.) If you are using such button
elds you are recommended to re-link the object to the button.
It must be said, however, that the best policy of all is to put files which are of significance to one database only into the database
PrintRes
directory. Only the leafname of the file is stored in this case and, on finding only a leafname,
Powerbase
looks for the file in
PrintRes
The link between a pop-up menu button and the field into which the menu enters data was formerly established by using the field-number of the data field as the tag of the menu button. This has now been changed so that the actual tag of the relevant data field is used instead of the field-number. i.e. the data field and the menu button have the same tag
the only circumstance in which this is permitted (apart from label text which has a null tag). If you do enter the field-number you will find on returning to the field definition that the tag has been substituted. User menus on older databases which actually do use the field-number as the button tag will still work correctly.
The procedure for creating and editing the text file for a user menu has also been improved. When the menu button is clicked with SELECT or MENU for the first time the default text file is displayed in an editor and contains instructions for tailoring it to your requirements. You then save the file under the same name and subsequent clicks on the menu button open the menu. Should you need to edit the menu file again later you can call it up by clicking the menu button with ADJUST. These changes make it unnecessary for users to delve into the
Menus
directory inside the database.
By default user menus pop up whenever the caret enters the associated data field. This action can be turned off via a new switch on the Preferences window.
5.5 Displaying validation tables
Double-clicking a linked data field to bring up the relevant validation table entry now works for Scrollable list fields, as does the automatic display of linked data when the
Display linked table data
switch on the Preferences window is selected.
5.9 Entering validation table data into a record
The ability to enter data into a field by double-clicking with SELECT on an item in a validation table has now been extended. You can enter data into Scrollable list fields in this way. Moreover, the caret moves automatically to the next cell on the assumption that you are probably entering several items from the table into the list. On reaching the last cell, holding down Shift as you double-click will add a new row to the list, making this form of input consistent with direct typing into the list.
Two further improvements have been made to the use of validation tables with Scrollable list fields. Coded data will be expanded in reports if the
Expand codes
switch is selected in Print options, and the Replace-on-entry feature also works, provided the replacement string will fit the cell of the Scrollable list.
It is also possible to enter data from a validation table into other writable icons on
Powerbase
dialogue boxes using this method. It could be especially useful as an aid to entering search formulae.
6 Performing calculations
Computed fields, containing the results of calculations and string operations on other fields (and also the results of User Functions) have been present in
Powerbase
for a long time now. They do, however, have the disadvantage of requiring the user either to foresee at the time the database is designed
what calculations will be required or reformat later in order to include a field which might only be needed for a one-off inclusion in a report.
v. 8.20 lets you specify such calculations
without
the need for a field to which to attach them. In a sense they resemble the existing column calculations for mean, standard deviation etc. in that they are performed on the fly during the creation of a report.
To define a calculation choose the new entry
Extra calculations
Ctrl Shift N
from the
Print
submenu. The window which appears requires you to enter a formula, which has exactly the same format as the formulae attached to Calculated and Composite fields (see
and
6.2, M
). Since the calculation will not be attached to a field from which to derive a heading, a width and whether the result is to be numeric or not, you must supply this data yourself. If you omit anything
Powerbase
will use the formula itself as a heading, assume a Numeric result and assign a width of 15 characters (the maximum space a number can occupy). If you have clicked the radio button to select a String (i.e. non-numeric) result such as would be placed in a Composite field, the width will default to 255 characters. This might seem an enormous value, but unnecessary
white space
will be removed from the report before printing if the output is to the printer. If the report is to be displayed in a window the
Shrink list
button on the Print options window should be selected. Failing this you may remove the surplus space by choosing
Shrink list
from the menu over the report window.
It is possible to produce errors by unsuitable combinations of fields and result types (just as it is for Computed fields). The main thing to remember is that Numeric fields will normally produce a numeric result so assigning a String operation to such fields can be expected to produce an error. There are exceptions even to this rule since the Basic STR$() function may be used to convert a number to a string, thus allowing Numeric fields to give a String result. Dates, Times and User Functions may be used in Extra calculations, just as they can in Computed fields.
When you have defined your calculation, click on
Include
. The displayed calculation number will go from 0 to 1 and the window is set up for entry of another calculation. A total of 10 (numbered 0-9) are allowed and you may return to earlier calculations to edit them by clicking the
icons.
The position of such calculated results in the report is determined by the point at which you define them. If you click ADJUST to highlight a field, then type
Ctrl Shift N
to bring up the new window and define a calculation, and finally highlight another field, the calculated result will appear between the highlighted fields. The menu of selected fields (see
3.7.2, S
) shows these calculations in red so you can easily check on the order in which things will appear on the report. You can choose the red entries from this menu to bring up the calculation window for editing.
All defined calculations are saved as part of a Print Selection and will be restored when the Selection file is subsequently reloaded. The
Clear
button on the calculation window has the same effect as
Clear selection
Ctrl Z
) from the
Print
submenu.
6.3 User functions
The management of User functions has been improved. Previous versions of
Powerbase
kept all user functions in a single Basic
le called
UserFuncs
, which was placed directly inside the database directory and loaded as a library when the database was opened. This could be somewhat inconvenient. If the user wanted to use a function from the supplied
UserFuncs
le s/he could either place the entire
le inside the database, leading to a waste of memory, or extract the required function and save it separately in the database directory as
UserFuncs
From v.8.24
UserFuncs
is a directory and each function is saved in it as a separate Basic program
le which may be called anything the user wishes. When the database is opened all such
les, whether there
s one or a dozen, are loaded. Individual databases therefore need only store the User functions they actually need and copying individual functions from one database to another is easy.
If, on opening a database, it is found to contain an old-style
UserFuncs
le, as opposed to a directory, the missing directory is created and the
le transferred to it. It will not, however, be split into separate functions.
7.2 Indexing a field
All dates and date-related fields such as day-of-week, month-of-year now index chronologically.
8.3 Exporting data as a CSV file
CSV export has been harmonised with printing in two ways. If there is a default print selection file (i.e. one called !Selection in PrintRes) it will be used to determine what fields are exported provided no alternative selection has been highlighted. If you hold down Shift when initiating a CSV export operation only the currently-displayed record will be exported.
8.3.1 Scrollable lists and CSV files
When you include a scrollable list as one of the fields in a CSV file it will be written as a single CSV field if the single row format is selected in the Print options window. The data from individual rows of the list was formerly separated by a semicolon but this is now configurable by a new choice
Scroll term
in the CSV options window underneath the Separator and Terminator for CSV fields. The default for Scroll term is still a semicolon. The data from individual cells in the same row of the scrollable list are separated by the same CSV separator as is used between CSV fields.
The above description might seem confusing but will become clearer if you export data from the sample database
Scroller
using the default settings but with
In quotes
selected in CSV options. You will see that the entire scrollable list from each record is enclosed in double quotes, between which the items from within each row are separated by commas, a semicolon marking the end of each row.
A file exported in this way can be re-imported into a
Powerbase
database. You must ensure that the scrollable list data goes back into a scrollable list field, although it need not have the same number of columns as the one from which it was exported. If the new list has more columns than the old there will be one or more blank columns on the right hand side; if there are fewer columns data from the missing columns will be discarded. This handling of
data underflow
and
data overflow
is the same as what happens when there are more or fewer
fields
in the the database than in the one from which the file was exported (see
8.4.2, M
If you change the CSV printing format in Print options from
As single row
As columns
and export the CSV file again (in quotes as before) you will see the contents of
each row
enclosed in double quotes and separated by commas, the items from within each row being also separated by commas.
Exporting this second file
without
the quotes (or the first file if you first change Scroll term to a comma) will result in a file in which every single cell of the scrollable list appears as a separate CSV field, separated from the next by a comma. This might prove useful if transferring data from a database which contains a scrollable list to one which doesn
8.6 Creating a new, working database from a CSV file
The facility has been much improved, but this involves changes to the header format described in the manual. Instead of the sequence:
maximum length
field-type number
it now uses:
maximum length
field-type number
descriptor
The separator between these pieces of information is the vertical bar (|) rather than the international currency symbol (
). Neither is very likely to occur as a normal character in a CSV file but the former has a dedicated key on all keyboards whereas the latter, although it appeared on A3000 and other early Acorn keyboards, does not. The CSV separator is, of course, used between the groups of items relating to each field so, assuming this to be a comma, we have:
You may omit the field-type and either the descriptor or tag, but not both. This gives a minimum specification for each field of:
<number>|<string>
The number will be interpreted as data length and the the omitted field-type assumed to be 0, i.e. Unrestricted. This makes it possible to use this facility without knowing the field-type numbers (they can be found in !Powerbase.Resources.ValStrings) but with no control imposed on any subsequent input. The supplied string will be used for both descriptor and tag, as in the older format. You can force a null descriptor (but not a null tag) by putting two bar characters together:
<number>||<string>
9.2 Mail-merging with
Impression
OvationPro
Yes! At long last
Powerbase
can mail-merge with
OvationPro
using the same method as for
Impression
, i.e. using the
ImpulseII
module supplied with
Powerbase
. When using
Powerbase
with
OvationPro
you can if you wish alter the
Impulse
client
field in the Preferences window to read
OvationPro
instead of
Impression
, but this isn
t really necessary because
Powerbase
knows which you are using from the
letype of the document dropped on the record window.
Preparing an
OvationPro
document for
Impulse
-type merging is a slightly more complicated process than for an
Impression
document and you are strongly recommended to use the new, user-friendly method described below, which is applicable to both. If you are using
Impression
there are no extra preliminaries, but to use this method with
OvationPro
you first need to do the following:
Open the
Applets
subdirectory inside
OvationPro
and copy the
!Impulse
applet into it. If your
OvationPro
is a recent version, supplied on CD, you will find this applet in the
DavidPilling.Applets
directory.
The filer also needs to have
the
!TransDDF
filter which is in the directory
DavidPilling.Filters
on the CD. The
!Boot
!Run
files of this filter need to be modified to load ASCII DDF files as described in the
!Help
file.
Inserting the merge commands
If all that is required is to merge the contents of a field the procedure is:
Place the caret in the
Impression
document where you want to insert the command.
Point at the required
Powerbase
field, hold down SELECT and Shift/drag the field to the document. (Dragging without Shift inserts the field contents. See
2.5.2, S
This inserts an
Impulse
GetField command which will appear at the caret. There are, however, other
Impulse
commands which you might want to insert, e.g. GetExpanded which may be used for fields which are linked to validation tables. Instead of inserting the actual field contents, GetExpanded will insert the
expanded
item from the second column of the validation table. (See
5.8, M
). Also very useful is the NextMatch command which allows you to continue inserting from the next matching record into the
copy of the document instead of producing a fresh document for each record.
All three of the commands described may inserted by choosing the new entry
Merge commands
from the iconbar
Utilities
submenu. The procedure for this method is:
Display the tag of the relevant field using either the
icons or pop-up menu
Choose the required command from the lower pop-up menu. (For NextMatch the field displayed is unimportant.) If GetExpanded is to be used the expanded string is taken, by default, from column 1 of the validation table. You can if you wish expand from a different column by entering the column number in the writable menu item attached to the GetExpanded choice. Remember that columns are numbered from 0.
Place the caret in the required place in the
Impression
document.
Drag the text-file icon onto the document (without Shift this time).
10.2/10.3 Adjusting/Changing the record format
All the objects which can appear on the record screen are regarded as fields and have a field-number and field-type, even though many of them don
t actually hold any data. The control buttons which duplicate those on the tool-pane or keypad are an obvious example. When you define such fields the
Data length
icon on the Field design window is greyed out because
Powerbase
assigns zero to them without your needing to do anything. However, each of the fields, zero length notwithstanding, used to occupy one byte (a newline character) in every record of the
Database
file. In v.8.21 and later this is no longer the case: button fields occupy
file space. This means that the
Database
file might be smaller
perhaps quite a lot smaller if there are many on-screen buttons and the database is large.
There is, though, another far greater advantage. Because such fields no longer affect the record length
it is possible to add them to a functioning database without rebuilding it
. Previously, the only changes you could make without rebuilding were minor ones such as renaming and moving fields or changing an alphanumeric to a numeric field. You can now do much more.
I can imagine some users saying
So what? I never put control buttons on my database screens
. Well, the change affects other things besides buttons. The complete list of zero-length fields is:
All keypad-type buttons
All additional buttons, including those which open directories or run files
Textual labels. i.e. Fields which consist of a descriptor only
All External field-types
except Remote
Logos
Scrollable lists
Some of these might surprise you. Weren
t we talking about fields with no associated data? Not necessarily; we
re talking about fields which don
t place any data
in the Database file
. External fields do have data associated with them but it
s stored in separate, discrete files, one for each record. Remote fields are an exception because they store a pathname to a file/directory/application somewhere on the system and the pathnames
kept in
Database
. Scrollable lists are really a special type of External field because they too involve a separate file associated with each record. It
s worth saying again: all the field-types listed above can be added to an existing database simply by means of what was formerly called the
Adjust format
utility provided the
Database
file has the new format.
Reflecting this important change the utility referred to above appears on the menu as
Alter format
if the new format is detected and the
New record format
utility appears as
Rebuild database
How do older databases fare under the new arrangement? If any of the above field-types are present they will occupy a byte each in every record and
Powerbase
needs to be able to distinguish an old-style
Database
file from a new one. To achieve this the file in a newly-created database is given the filetype &fff (Text) instead of &7f2. (The latter is now used only for the Form file in new databases and is adorned with an
instead of a
.) If, when a database is opened, the
Database
file is found to be of type &fff the
Alter format
utility will allow you to create fields of the types listed above. If the filetype is &7f2 the facilities available will have the old names on the
Utilities
menu and
are limited to the minor adjustments of previous versions.
Adding extra Editable fields, Check-boxes, Computed fields and Stamp fields (except Logo) still necessitates rebuilding the database, the procedure for which is unchanged. The
Database
file is, of course, rebuilt according to the new structure and given type &fff. The easiest way to update your database to the new format is therefore to invoke
New record format
without making any changes when offered the design screen.
Although databases created with older versions of
Powerbase
work fine under v.8.21 the reverse may
be true. Do take care not to run a newly-created database with an older
Powerbase
. No harm should result if the database contains none of the affected field-types but if any are present the database is likely to be corrupted.
Reformatting a database containing an 8-character date (2-digit year) so that the field becomes a 10-character date (4-digit year) now makes the change without assuming 21st century for all values. The rule followed is the same as that for reformatting a
short
date entered into a field intended for a
one (see
4.2.5, S
). Reformatting a 10-character date to an 8-character one now works correctly.
10.6 Inspecting and balancing index trees
Balancing can be invoked with
Ctrl B
. When complete, the totals in each tree level are displayed. If
Ctrl Shift B
is used the full tree structure is displayed. Formatting of the latter has been improved, keys in different levels being spaced taking account of the key length so that no overlapping occurs. There is now a choice on the
Print index
submenu between the previous unsymmetrical format in which the root is printed first, and a more symmetrical one.
12 Script files
!QUERY
command can, like
!SELECTION
!PRINTOPTS
, now accept a filename, which must, of course, be that of a valid saved Query file. (See
!SCRIPT
12, M
for rules relating to filenames.)
When requesting user-input for the
!FORMAT
command only the initial letter H, V, T or L is required. If an attempt is made to execute a
!QUERY
with the format set to Table or Label and the output destination not set to Printer an error message is printed. (This is the only way you
attempt to do such a thing: access to the Printer set-up window is barred until you select Printer.)
14.4.3 Preferences
Options switches
A new option switch has been added which causes
Powerbase
remember
which records, if any, are marked and restore the marks when the database is next opened. The type of marking (Include or Exclude) is also saved. An option which determines whether or not user menus open automatically when the caret enters the associated data field has already been mentioned (
4.2.11, S
Save edits as CSV
Prior to v.8.25 the
le saved in
PrintJobs
was simply called
NewData
. The data saved from a previous editing session would be overwritten the next time the database was opened (assuming the option switch was set). The position has now been improved by adding an incrementing number to the
lename so that
les are saved successively as
NewData01
NewData02
print
DrawPlus
Supplement v.8.27
09 January 2002
NOTE. Supplements will henceforth be given the same version number as the version of Powerbase to which they refer
v. 8.00 of
Powerbase
was released in March 2001. The most recent manual (dated May) and text
les cover, with minor exceptions, all features included in version 8.05. The changes and new features introduced since then have been brie
y described in a text
le called !Update, included on the distribution disc, but now seems a suitable time to issue a proper supplement, which should be read in conjunction with the manual referred to above.
A word needs to be said about the organisation of the supplement. Features which are completely new, or which somehow escaped mention in the main manual are described
rst. Features which are extensions or modi
cations to pre-existing ones are described, as far as possible, under the chapter heading (and section number, where appropriate) of the part of the main manual to which the new material relates. This may look rather strange but it means that you can immediately
nd the place in the manual which should be consulted alongside the supplement to see how the new features relate to the old.
Where cross-references occur there is the possibility of confusion; do they refer to the Manual or the Supplement? To avoid this they are suf